Skip to content

Testing for clearing of eager loaded non cacheable relations #297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Hornet-Wing
Copy link
Contributor

This is a test to demostrate the bug discussed in #292. I have tried to use existing test classes and models but I can adapt it to create bespoke ones. Let me know if this is OK.

…ot cleared and as a result will provide stale data.
@mikebronner
Copy link
Owner

@Hornet-Wing Awesome! I will try to get to it this weekend. :)

@mikebronner mikebronner self-assigned this Oct 12, 2019
@mikebronner mikebronner merged commit ece9a9c into mikebronner:master Oct 12, 2019
@mikebronner
Copy link
Owner

@Hornet-Wing Go ahead and give release 0.7.2 a try. The final implementation ended up being that any queries that have non-catchable eager-loaded relationships will not be cached in their entirety to avoid the cache of the relationship going stale. There really was no other way around that.

@Hornet-Wing
Copy link
Contributor Author

Sorry it took me a little while to get this tested. Unfortunetly my main project is still 5.8 so I created a seperate project to test this in isolation.

Unfortunetly it still doesnt quite work as expected. I'm planning on taking a closer look, maybe my tests were wrong. :/

https://github.com/Hornet-Wing/model-cache-eager-load

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants